import { request } from '@umijs/max';

export async function fetchList(api_key) {
  return request(`/comment/comments`, {
    method: 'GET',
    headers: {
      'api-key': api_key,
    },
  });
}

export async function fetchSubmit(data) {
  return request(`/comment/submit`, {
    method: 'POST',
    data
  });
}

export async function fetchSubmitTask(id) {
  return request(`/comment/comment/${id}`, {
    method: 'GET',
  });
}
